/*
 *  Copyright 2023 Collate.
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  http://www.apache.org/licenses/LICENSE-2.0
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

@import (reference) '../../../styles/variables.less';

.github-star-popup-card {
  border: none;
  position: fixed;
  right: 30px;
  bottom: -100%;
  z-index: 1;

  .ant-card {
    position: relative;
    width: 338px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(117, 117, 117, 0.3);
    border: 1px solid @primary-color;

    .ant-card-body {
      padding: 26px;
    }
  }

  .github-star-icon {
    width: 24px;
    vertical-align: sub;
    color: @yellow-2;
  }

  .github-star-popup-header {
    color: @primary-color;
    font-size: 16px;
    font-weight: 600;
  }

  .github-star-popup-description {
    margin-top: 10px;
    color: @text-color;
    font-size: 12px;
    font-weight: 400;
  }

  .github-action-button-group {
    border-radius: 4px;
    border: @global-border;
    overflow: hidden;

    .github-modal-action-button {
      border: none;

      &:hover {
        color: initial;
        border: none;
      }
      &:focus {
        color: initial;
        border: none;
      }
    }

    .github-star-button {
      background: linear-gradient(0.5turn, rgba(0, 0, 0, 0.2), transparent);
      border-right: @global-border;

      &:hover {
        border-right: @global-border;
      }
    }
  }
}

.github-star-popup-card-with-alert {
  animation: scrollInWithAlert 2s normal forwards ease-in-out;
  animation-delay: 1s;
}

.github-star-popup-card-without-alert {
  animation: scrollInWithoutAlert 2s normal forwards ease-in-out;
  animation-delay: 1s;
}

@keyframes scrollInWithAlert {
  to {
    bottom: 170px;
  }
}

@keyframes scrollInWithoutAlert {
  to {
    bottom: 24px;
  }
}
